fw = open('05.txt', mode='w', encoding='utf-8')
# 写入多个数据
lines = ['小东\n', '小军\n', '小红\n', '小美\n', '小明\n']
fw.writelines(lines)

fw.close()